{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>查看活动详情</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t" name="add_article" id="add_article" enctype="multipart/form-data">
                        <input type="hidden" name="id" value="{$res['id']}">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">标题：</label>
                            <div class="input-group col-sm-4">
                                <input id="activity_name" disabled name="activity_name" type="text" class="form-control"value="{$res.activity_name?$res.activity_name:''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">活动标签：</label>
                            <div class="input-group col-sm-4">
                                {volist name="activity" id="vo"}
                                <div class="checkbox checkbox-success">
                                    <input id="checkbox3" disabled class="activity" name="activity[]"  value="{$vo.id}" type="checkbox"{if in_array($vo['id'],$res['activity_id'])} checked {/if}>
                                    <label for="checkbox3">
                                        {$vo.activity_name}
                                    </label>
                                </div>
                                {/volist}

                                <!--<input  type="text"  class="form-control" value="{$res.name?$res.name:''}">-->
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">发布时间：</label>
                            <div class="input-group col-sm-5">
                                <input type="text" disabled class="form-control"value="{$res.create_time?$res.create_time:''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">活动报名人数：</label>
                            <div class="input-group col-sm-5">
                                <input type="text" disabled class="form-control"value="{$res.activity_num?$res.activity_num:''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">活动状态：</label>
                            <div class="input-group col-sm-5">
                                {if $res['activity_status']==1}
                                <input type="text" disabled class="form-control"value="未开始">
                                {elseif $res['activity_status']==2 /}
                                <input type="text" disabled class="form-control"value="报名">
                                {elseif $res['activity_status']==3 /}
                                <input type="text" disabled class="form-control"value="进行中">
                                {else /}
                                <input type="text" disabled class="form-control"value="结束">
                                {/if}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">审核状态：</label>
                            <div class="input-group col-sm-5">
                                {if $res['activity_sh']==1}
                                <input type="text" disabled class="form-control"value="审核通过">
                                {elseif $res['activity_sh']==2 /}
                                <input type="text" disabled class="form-control"value="审核未通过">
                                {else /}
                                <input type="text" disabled class="form-control"value="未审核">
                                {/if}
                            </div>
                        </div>
                        {if $res['activity_sh']==2}
                        <div class="form-group">
                            <label class="col-sm-3 control-label cyanse" for="myEditor">内容：</label>
                            <div class="input-group col-sm-9">
                                <textarea   class="content" name="activity_content"style="width:90%;height:200px" >
                                <?php echo(html_entity_decode($res['activity_sh_content']?$res['activity_sh_content']:''))?>
                                </textarea>
                            </div>
                        </div>
                        {/if}
                        <div class="form-group">
                            <label class="col-sm-3 control-label">图片：</label>
                            <div class="input-group col-sm-5">
                                <input type="hidden" id="data_photo" name="images" value="{$res.activity_img}">
                                <img id="img_data" height="100px" style="float:left;margin-left: 50px;margin-top: -10px;cursor:pointer;" src="{$res.activity_img}" onerror="this.src='/static/admin/images/no_img.jpg'" onclick='imgDisplay(this)'/>
                                <div id="fileList" class="uploader-list" style="float:right"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">活动报名时间：</label>
                            <div class="input-group col-sm-4">
                                <input type="text" disabled name="start" value="{$res['activity_sign_start']?$res['activity_sign_start']:''}"onclick="laydate({istime: true,format: 'YYYY-MM-DD hh:mm'})" class="form-control layer-date search start" placeholder="开始日期" />
                                <span class="input-group-addon">到</span>
                                <input type="text"  disabled name="end"  value="{$res['activity_sign_end']?$res['activity_sign_end']:''}" onclick="laydate({istime: true,format: 'YYYY-MM-DD hh:mm'})"  class="form-control layer-date search end" placeholder="结束日期" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">活动开始时间：</label>
                            <div class="input-group col-sm-4">
                                <input type="text" disabled  name="startTime" value="{$res['activity_start_time']?$res['activity_start_time']:''}"  onclick="laydate({istime: true,format: 'YYYY-MM-DD hh:mm'})" class="form-control layer-date search startTime" placeholder="开始日期" />
                                <span class="input-group-addon">到</span>
                                <input type="text"  disabled name="endTime" value="{$res['activity_end_time']?$res['activity_end_time']:''}"  onclick="laydate({istime: true,format: 'YYYY-MM-DD hh:mm'})"  class="form-control layer-date search endTime" placeholder="结束日期" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">发布机构：</label>
                            <div class="input-group col-sm-4">
                                <input type="text" disabled class="form-control"value="{$res.mechanism_name?$res.mechanism_name:''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">公益时长：</label>
                            <div class="input-group col-sm-4">
                                <input id="" disabled type="text" name="activity_time" class="form-control activity_time" placeholder="已小时为单位(H)" value="{$res.activity_time?$res.activity_time:''}">
                            </div>
                        </div>

                        <div class="form-group" id="MyContent">
                            <label class="col-sm-3 control-label cyanse" for="myEditor">内容：</label>
                            <div class="input-group col-sm-9">
                                <textarea   class="content" name="activity_content"style="width:90%" id="myEditor">
                                <?php echo(html_entity_decode($res['activity_content']?$res['activity_content']:''))?>
                                </textarea>
                                <a id="myEditors" style="color:#A94543"></a>
                            </div>
                        </div>


                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <a class="btn btn-danger" href="javascript:history.go(-1);"><i class="fa fa-close"></i> 返回</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    //    $('input[name="activity"]').click(function () {
    //        if($("input[name='activity[]']:checked").length >2){
    //            layer.msg("不能超过2个标签", {icon: 1, time: 1500, shade: 0.1}, function (index) {
    //            });
    //            return false;
    //        }
    //    })
</script>
<script type="text/javascript">
    //百度富文本编辑器
    var editor = UE.getEditor('myEditor', {
        initialFrameHeight:450,
        autoHeight: false,
        autoHeightEnabled:false,
        autoFloatEnabled:false
    });
</script>

</body>
</html>